home *** CD-ROM | disk | FTP | other *** search
- package com.ibm.xml.parser;
-
- import java.util.BitSet;
-
- public class CMLeaf extends CMNode {
- static final long serialVersionUID = 8334965779973489245L;
- String name;
- int position;
- int maxPosition;
-
- public CMLeaf(String var1) {
- this.name = var1;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String toString() {
- return this.name;
- }
-
- CMNode cloneNode() {
- CMLeaf var1 = new CMLeaf(this.name);
- var1.position = this.position;
- var1.maxPosition = this.maxPosition;
- return var1;
- }
-
- void setPosition(int var1) {
- this.position = var1;
- }
-
- int getPosition() {
- return this.position;
- }
-
- boolean nullable() {
- if (super.nullable == null) {
- super.nullable = new Boolean(false);
- }
-
- return false;
- }
-
- BitSet firstpos() {
- if (super.firstPos == null) {
- super.firstPos = new BitSet(this.maxPosition);
- super.firstPos.set(this.position);
- }
-
- return super.firstPos;
- }
-
- BitSet lastpos() {
- if (super.lastPos == null) {
- super.lastPos = new BitSet(this.maxPosition);
- super.lastPos.set(this.position);
- }
-
- return super.lastPos;
- }
-
- void prepare(int var1) {
- this.maxPosition = var1;
- }
-
- void setFollowpos(BitSet[] var1) {
- }
-
- public boolean equals(Object var1) {
- if (!(var1 instanceof CMLeaf)) {
- return false;
- } else {
- CMLeaf var2 = (CMLeaf)var1;
- return var2.getName().equals(this.getName());
- }
- }
-
- public int hashCode() {
- return this.getName().hashCode();
- }
- }
-